﻿using Jay.Sc2.Bof.Lib.State;

namespace Jay.Sc2.Bof.Lib.Action.Protoss
{
	public abstract class ActionUpgradeFromCyberneticsCore : ActionUpgradeFromProtoss
	{
		protected ActionUpgradeFromCyberneticsCore(int researchTime, int minerals, int gas) : base(researchTime, minerals, gas) { }
		public override ProtossState.ProtossProductionBuilding GetProductionBuilding(ProtossState state) { return state.CyberneticsCore; }
		public override IAction[,] Requirements
		{
			get
			{
				if (m_Requirements == null)
					m_Requirements = new IAction[,] { { ActionProduceCyberneticsCore.Instance, ActionHarvestGasProbe.Instance } };
				return m_Requirements;
			}
		}
	}
	public class ActionUpgradeGatewayToWarpGate : ActionUpgradeFromCyberneticsCore
	{
		public static ActionUpgradeGatewayToWarpGate Instance = new ActionUpgradeGatewayToWarpGate();
		private ActionUpgradeGatewayToWarpGate() : base(140, 50, 50) { }
		public override ProtossState.ProtossUpgrade GetUpgrade(ProtossState state) { return state.GatewayToWarpGate; }
		public override string EventName { get { return "ActionResearchedGatewayToWarpGate"; } }
	}
}
